// 导入发送请求的api接口
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 工时单价主查询
export const getWorkHourPrice = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/repair/workHourPrice/findAll`, {
    params
  });

// 新增工时单价
export const addWorkHourPrice = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/repair/workHourPrice/addWorkHourPrice`, params);

// 修改工时单价
export const editWorkHourPrice = (params, id) => axios.put(`${SERVER.DMSCLOUD_REPAIR}/repair/workHourPrice/editWorkHourPrice`, params);
// 需要排除的车系
export const getPriceSeriesCode = (params, id) => axios.get(`${SERVER.DMSCLOUD_REPAIR}/repair/workHourPrice/getPriceSeriesCode`, params);
// 获取工时单价
export const getPriceByInfo = (params, id) => axios.post(`${SERVER.DMSCLOUD_REPAIR}/repair/workHourPrice/getPriceByInfo`, params);

// 删除工时单价
export const deleteWorkHourPrice = (params, id) => axios.delete(`${SERVER.DMSCLOUD_REPAIR}/repair/workHourPrice/deleteWorkHourPrice/${id}`, params);

// 车系下拉列表
export const findProjectModelList = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/repairProject/findProjectModelList`, {
    params
  });
